/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Modele;

import java.util.Collection;
import java.util.TreeSet;

/**
 *
 * @author sio
 */
public class Specialite implements Comparable<Specialite>{
    
    private String nom;
    private Collection<Medecin> lesMeds = new TreeSet<Medecin>();
    
    public Specialite(String nom){
        this.nom=nom;      
    }
    
    public String getNom(){
        return this.nom;
    }
    
    public Collection<Medecin> getLesMeds(){
        return this.lesMeds;
    }
    
    public void addMed(Medecin unMed){
        this.lesMeds.add(unMed);
    }

    @Override
    public int compareTo(Specialite o) {
        //throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        return nom.compareTo(o.nom);
    }
}
